package com.ruoyi.testDeal.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.testDeal.domain.basic.ReportHj;
import com.ruoyi.testDeal.mapper.ReportHjMapper;
import com.ruoyi.testDeal.service.IReportHjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 检测检验环境信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-29
 */
@Service
public class ReportHjServiceImpl implements IReportHjService
{
    @Autowired
    private ReportHjMapper reportHjMapper;

    /**
     * 查询检测检验环境信息
     * 
     * @param reportHjId 检测检验环境信息主键
     * @return 检测检验环境信息
     */
    @Override
    public ReportHj selectReportHjByReportHjId(Long reportHjId)
    {
        return reportHjMapper.selectReportHjByReportHjId(reportHjId);
    }

    /**
     * 查询检测检验环境信息
     *
     * @param reportNum
     * @return 检测检验环境信息
     */
    @Override
    public ReportHj selectReportHjByReportNum(String reportNum) {
        return reportHjMapper.selectReportHjByReportNum(reportNum);
    }

    /**
     * 查询检测检验环境信息列表
     * 
     * @param reportHj 检测检验环境信息
     * @return 检测检验环境信息
     */
    @Override
    public List<ReportHj> selectReportHjList(ReportHj reportHj)
    {
        return reportHjMapper.selectReportHjList(reportHj);
    }

    /**
     * 新增检测检验环境信息
     * 
     * @param reportHj 检测检验环境信息
     * @return 结果
     */
    @Override
    public int insertReportHj(ReportHj reportHj)
    {
        reportHj.setCreateTime(DateUtils.getNowDate());
        return reportHjMapper.insertReportHj(reportHj);
    }

    /**
     * 修改检测检验环境信息
     * 
     * @param reportHj 检测检验环境信息
     * @return 结果
     */
    @Override
    public int updateReportHj(ReportHj reportHj)
    {
        reportHj.setUpdateTime(DateUtils.getNowDate());
        return reportHjMapper.updateReportHj(reportHj);
    }

    /**
     * 批量删除检测检验环境信息
     * 
     * @param reportHjIds 需要删除的检测检验环境信息主键
     * @return 结果
     */
    @Override
    public int deleteReportHjByReportHjIds(Long[] reportHjIds)
    {
        return reportHjMapper.deleteReportHjByReportHjIds(reportHjIds);
    }

    /**
     * 删除检测检验环境信息信息
     * 
     * @param reportHjId 检测检验环境信息主键
     * @return 结果
     */
    @Override
    public int deleteReportHjByReportHjId(Long reportHjId)
    {
        return reportHjMapper.deleteReportHjByReportHjId(reportHjId);
    }

    /**
     * 删除检测检验环境信息
     *
     * @param reportNum
     */
    @Override
    public int deleteReportHjByReportNum(String reportNum) {
        return reportHjMapper.deleteReportHjByReportNum(reportNum);
    }
}
